package wzc.design_pattern.construction.decorator;

/**
 * @Author 那和不是个啥
 * @Date 2025/7/20
 * @Description
 */

public class DecoratorPatternDemo {
    public static void main(String[] args) {
        Coffee coffee = new SimpleCoffee();
        System.out.println(coffee.getDescription() + " 价格：" + coffee.cost());

        coffee = new MilkDecorator(coffee);
        System.out.println(coffee.getDescription() + " 价格：" + coffee.cost());

        coffee = new SugarDecorator(coffee);
        System.out.println(coffee.getDescription() + " 价格：" + coffee.cost());
    }
}
